#include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	_int64 a, b, sum;
	while (cin >> hex >> a >> b) {
		sum = a + b;
		if (sum < 0) {
			cout << "-" << hex << uppercase << -sum << endl;
		}
		else {
			cout << hex << uppercase << sum << endl;
		}
	}
	return 0;
}